package com.tianji.learning.controller;

import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.tianji.common.domain.dto.PageDTO;
import com.tianji.learning.domin.vo.ReplyVO;
import com.tianji.learning.query.ReplyPageQuery;
import com.tianji.learning.service.IInteractionReplyService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/replies")
@RequiredArgsConstructor
public class InteractionReplyAdminController {
    private final IInteractionReplyService replyService;

    @GetMapping("/page")
    public PageDTO<ReplyVO> queryReplyPage(ReplyPageQuery pageQuery) {

        return replyService.queryReplyPage(pageQuery, true);
    }

    @PutMapping("/{id}/hidden/{hidden}")
    public void hidden(@PathVariable("id") Long id, @PathVariable("hidden") Boolean isHidden) {
         replyService.updateHidden(id,isHidden);


    }

}
